const state = {
  operator: {}, // 操作员
  authorityMenus: [
    { path: '*' },
    { path: '/login' },
    { path: '/', meta: { title: '首页' }, children: [{ path: '/', meta: { title: '首页' } }] }
  ]
}

const mutations = {
  // 更新菜单路由
  saveAuthorityMenus(state, arr) {
    state.authorityMenus = arr
  },
  // 清除菜单路由
  removeAuthorityMenus(state) {
    state.authorityMenus = []
  },
  // 保存操作员
  saveOperator(state, obj) {
    state.operator = obj
  },
  // 清除操作员
  removeOperator(state) {
    state.operator = {}
  }
}

const actions = {}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
